package deviseMode.create.factory.simplefactory;


import deviseMode.create.factory.Huawei;
import deviseMode.create.factory.IComputer;

/**
 * 小作坊式的工厂模型
 */
public class SimpleFactoryTest {

    public static void main(String[] args) {

//        ICourse course = new JavaCourse();
//        course.record();

//        ICourseFactory factory = new ICourseFactory();
//        ICourse course = factory.create("com.gupaoedu.vip.pattern.factory.JavaCourse");
//        course.record();

        ComputerFactory factory = new ComputerFactory();
        IComputer course = factory.create(Huawei.class);
        course.work();

    }
}
